﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;
using Fuse8.ContentManagementFramework.Web.ApplicationRuntime;
using Fuse8.ContentManagementFramework.Web.StartUp;
using Fuse8.DomainFramework.Common.Locator;
using Fuse8.DomainFramework.UnityLocator;
using Microsoft.Practices.Unity;

namespace Fuse8.Websites.InternalSites.TemplateWebsite.Policy
{
    public static class SitePolicy
    {
        public static void Init()
        {
            IUnityContainer container = new UnityContainer();
            var locator = new UnityServiceLocatorWithLazy(container);
            DependencyServiceLocator.SetLocatorProvider(() => locator);

            CmsPolicy.Init(
                new CmsPolicyOptions
                {
                    Filters = GlobalFilters.Filters,
                    Routes = RouteTable.Routes,
                    FrontEndArea = "FrontEnd"
                });
        }

    }
}
